package org.t236.feign.order;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.t236.commons.model.AjaxResult;

@FeignClient(name = "order-service", fallback = OrderRemoteClientFallback.class)
public interface OrderRemoteClient {

    @GetMapping("/orders")
    AjaxResult find();

    @GetMapping("/orders/findByUserId")
    AjaxResult findByUserId(@RequestParam("userId") Long userId);
}
